Analyzing Millions of Lines of Code with Sparse Flow-Sensitive Pointer Analysis
نویسندگان
چکیده
Many program analyses perform better and produce more precise results when they are given precise pointer information. One dimension of precision is flow-sensitive pointer analysis (i.e., an analysis that respects a program’s control-flow), which has been shown to be useful for important applications such as program verification and understanding, among others. However, this type of pointer analysis has historically been unable to scale to programs with hundreds of thousands of lines of code. We present a new interprocedural flow-sensitive pointer analysis that has significantly better performance than the current stateof-the-art. There are two key ideas behind our algorithm: (1) We stage the pointer analysis by first running a flow-insensitive auxiliary pointer analysis that produces conservative def-use information; the primary flow-sensitive analysis can then employ a sparse analysis that efficiently propagates pointer information across these conservative def-use chains; and (2) we exploit a novel notion of equivalence called access equivalence, which allows the algorithm to efficiently apply the conservative def-use information for the sparse analysis even when the conservative nature of the auxiliary analysis produces a huge amount of def-use information. Together, these techniques produce the first flow-sensitive pointer analysis that can analyze a C program with 1.9M lines of code, an order of magnitude improvement over the previous state-of-the-art.
منابع مشابه
Verifying Finite-State Safety Properties on Millions of Lines of Code
We present a context-sensitive, flow-sensitive, field-sensitive, and intraprocedurally path-sensitive static analysis capable of verifying finite-state safety properties of very large systems. Unusually for finitestate property verifiers, our system analyzes functions separately, and it is this feature that enables scalability. We evaluate an implementation of our analysis by trying to verify t...
متن کاملEstimating the Impact of Scalable Pointer Analysis on Optimization
This paper addresses the following question: Do scalable control-flow-insensitive pointer analyses provide the level of precision required to make them useful in compiler optimizations? We first describe alias frequency, a metric that measures the ability of a pointer analysis to determine that pairs of memory accesses in C programs cannot be aliases. We believe that this kind of information is...
متن کاملAn Efficient Inclusion-Based Points-To Analysis for Strictly-Typed Languages
We describe the design and implementation of an efficient inclusion-based points-to analysis for strictly-typed object-oriented languages. Our implementation easily scales to millions of lines of Java code, and it supports language features such as inheritance, object fields, exceptional control flow, type casting, dynamic dispatch, and reflection. Our algorithm is based on Heintz and Tardieu’s...
متن کاملEfficient Flow-Sensitive Interprocedural Data-Flow Analysis in the Presence of Pointers
This paper presents a new worklist algorithm that significantly speeds up a large class of flow-sensitive data-flow analyses, including typestate error checking and pointer analysis. Our algorithm works particularly well for interprocedural analyses. By contrast, traditional algorithms work well for individual procedures but do not scale well to interprocedural analysis because they spend too m...
متن کاملRegion-Based Selective Flow-Sensitive Pointer Analysis
We introduce a new region-based SELective Flow-Sensitive (Selfs) approach to inter-procedural pointer analysis for C that operates on the regions partitioned from a program. Flow-sensitivity is maintained between the regions but not inside, making traditional flow-insensitive and flow-sensitive as well as recent sparse flow-sensitive analyses all special instances of our Selfs framework. By sep...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008